<template>
	<view class="bigpage">
		<u-swiper
		            :list="list1"
		           indicator
				   indicatorMode="line"
				   circular
		    ></u-swiper>
		<view class="page">
			<view class="card">
				<view class="card_name">
					{{content.petNickname}}
				</view>
				<view class="zhuangtai display">
					<view class="zhuangtai_item" v-if="content.medicalTreatment&&content.medicalTreatment.includes(1)">
						已绝育
					</view>
					<view class="zhuangtai_item" v-if="content.medicalTreatment&&content.medicalTreatment.includes(2)">
						已免疫
					</view>
					<view class="zhuangtai_item" v-if="content.medicalTreatment&&content.medicalTreatment.includes(3)">
						已驱虫
					</view>
					
				</view>
				<view class="display" style="margin-top: 10rpx;">
					<view class="card_left">
						<view class="smalltittle">
							姓名
						</view>
						<view class="card_tittle">
							{{content.petNickname}}
						</view>
						<view class="smalltittle">
							性别
						</view>
						<view class="card_tittle" v-show="content.gender==0">
							男
						</view>
						<view class="card_tittle" v-show="content.gender==1">
							女
						</view>
						<view class="smalltittle">
							地区
						</view>
						<view class="card_tittle">
							{{content.city}}
						</view>
					</view>
					<view class="">
						<view class="smalltittle">
							年龄
						</view>
						<view class="card_tittle">
							{{content.age}}岁
						</view>
						<view class="smalltittle">
							品种
						</view>
						<view class="card_tittle">
							{{content.breed}}
						</view>
						<!-- <view class="smalltittle">
							地区
						</view>
						<view class="card_tittle">
							天津市 武清区
						</view> -->
					</view>
				</view>
			</view>
			
			<view class="card">
				<view class="tittle">
					宠物特点
				</view>
				<view class="details">
					{{content.petCharacteristics}}
				</view>
			</view>
			<view class="card">
				<view class="tittle">
					宠物故事
				</view>
				<view class="details">
					{{content.story}}
					
				</view>
			</view>
			<view class="card">
				<view class="tittle">
					领养要求
				</view>
				<view class="details">
					{{content.adoptionRequirements}}
				</view>
			</view>
			
		</view>
		<view class="shenqing" @click="lingyang(content.uuid)">
			申请
		</view>
	</view>
</template>

<script>
	import {
		getDetails
	} from "@/api/request.js";
	import {
		addadoption
	} from "@/api/list.js";
	export default {
	        data() {
	            return {
					content:{},
	                list1: [
	                   
	                ]
	            }
	        },
			onLoad(option) {
				// this.getAnnouncementDetails(option.uuid)
				// 公告详情
				getDetails('/system/adoption/',option.uuid).then((res) => {
					this.content=res.data.data
					this.content.sintrReleaseImages.forEach(item=>{
						this.list1.push(item.imageUrl)
						
					})
					
					
				})
			},
			methods:{
				lingyang(uuid){
					uni.navigateTo({
						url: '/pages/release/shenqing?uuid='+uuid
					})
				},
			},
	    }
</script>

<style scoped>
	.shenqing{
		margin: 20rpx auto;
		background-color: #FF8297;
		color: #fff;
		border-radius: 50rpx;
		width: 300rpx;
		height: 100rpx;
		text-align: center;
		line-height: 100rpx;
	}
	.card_left{
		width: 50%;
	}
	.bigpage{
		background-color: #f3f4f6;
		height: 98vh;
	}
	.page{
		padding: 10rpx;
		box-sizing: border-box;
	}
	.card{
		margin-top: 20rpx;
		border-radius: 30rpx;
		padding: 20rpx;
		background-color: #fff;
		
	}
	.card_name{
		font-size: 20px;
		font-weight: bold;
	}
	.zhuangtai{
		margin-top: 10rpx;
	}
	.zhuangtai_item{
		font-size: 12px;
		padding: 8rpx;
		box-sizing: border-box;
		background-color: #FF8297;
		color: #fff;
		margin-right: 10rpx;
	}
	.smalltittle{
		font-size: 14px;
		color: #bfbfbf;
	}
	.tittle{
		font-size: 18px;
		font-weight: bold;
	}
	.details{
		font-size: 14px;
		color: #bfbfbf;
	}
</style>